<?php
namespace app\sign\model;

use think\Model;

class photosign extends Model
{
    public function sign($user_Id,$sign_Id,$sign_Time,$file){
        $Data = [
            "user_Id" => $user_Id,
            "sign_Id" => $sign_Id,
            "sign_Time" => $sign_Time,
            "photofile" => $file,
        ];
        return $this->insert($Data);
    }
    
    public function issign($user_Id,$sign_Id){
        $Data = [
            "user_Id" => $user_Id,
            "sign_Id" => $sign_Id,
        ];
        return $this->where($Data)->select();
    }

    public function signlist($sign_Id){
        $data= $this->alias('photo')
                    ->join('user u','u.Id = photo.user_Id')
                    ->where('sign_Id',$sign_Id)
                    ->select();
        return $data;
    }
}